/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package modelo;

/**
 *
 * @author David Vallejos A
 */
public class Registro {

    private Animal[] an;
    private int cantidad;

    public Registro(int num) {
        this.an = new Animal[num];
        this.cantidad = 0;
    }

    public Animal[] getAn() {
        return an;
    }

    public void setAn(Animal[] an) {
        this.an = an;
    }

    public int getCantidad() {
        return cantidad;
    }

    public void setCantidad(int cantidad) {
        this.cantidad = cantidad;
    }

    public void agregarAnimal(Animal a) {
        this.an[this.cantidad] = a;
        this.cantidad++;
    }

    @Override
    public String toString() {
        String out = "";
        for (int i = 0; i < this.cantidad; i++) {
            out += this.getCantidad() + "\n";
        }
        return out;
    }
}
